import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      component: resolve => require(['@/views/login.vue'], resolve),
    },
    {
      path: '/index',
      component: resolve => require(['@/views/index.vue'], resolve),
      children: [{
        path: '/index',
        component: resolve => require(['@/views/home/banner-management.vue'], resolve),
      },{
        // banner管理
        path: '/banner-management',
        component: resolve => require(['@/views/home/banner-management.vue'], resolve),
      },{
        //版面图片管理
        path: '/picture-management',
        component: resolve => require(['@/views/home/picture-management.vue'], resolve),
      },{
        //活动分类管理
        path: '/activity-management',
        component: resolve => require(['@/views/activity/activity-management.vue'], resolve),
      },{
        //活动列表
        path: '/activity-list',
        component: resolve => require(['@/views/activity/activity-list.vue'], resolve),
      },{
        //问卷管理
        path: '/questionnaire',
        component: resolve => require(['@/views/questionnaire/questionnaire.vue'], resolve),
      },{
        //测评列表
        path: '/evaluation',
        component: resolve => require(['@/views/evaluation/evaluation.vue'], resolve),
      },{
        //商品分类管理
        path: '/mall-classification',
        component: resolve => require(['@/views/mall/mall-classification.vue'], resolve),
      },{
        //商品列表
        path: '/mall-list',
        component: resolve => require(['@/views/mall/mall-list.vue'], resolve),
      },{
        //热门活动管理
        path: '/mall-hot',
        component: resolve => require(['@/views/mall/mall-hot.vue'], resolve),
      },{
        //订单报表
        path: '/report-order',
        component: resolve => require(['@/views/report/report-order.vue'], resolve),
      },{
        //用户报表
        path: '/report-user',
        component: resolve => require(['@/views/report/report-user.vue'], resolve),
      },{
        //申诉报表
        path: '/report-complaint',
        component: resolve => require(['@/views/report/report-complaint.vue'], resolve),
      },{
        //开票报表
        path: '/report-invoice',
        component: resolve => require(['@/views/report/report-invoice.vue'], resolve),
      },{
        //权限管理
        path: '/background-permission',
        component: resolve => require(['@/views/background/permission.vue'], resolve),
      },{
        //账号管理
        path: '/report-account',
        component: resolve => require(['@/views/background/account.vue'], resolve),
      }]
    }
  ]
})
